package ysq.xyg.web.model.po;

import lombok.NoArgsConstructor;

import lombok.Data;
import ysq.xyg.base.util.BaseConstant;
import ysq.xyg.base.util.BaseUtil;
import ysq.xyg.sys.model.po.SysUser;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * 业务模块-社团人员信息实体类
 *
 * @author shengQiang yu
 * @date 2019-5-13 9:28:08
 */
@Data
@NoArgsConstructor
@Table(name = "xyg_web_corporation_user")
public class WebCorporationUser implements Serializable{

	/**
     * 主键
     */ 
	@Id
	private String id;
	
	/**
     * 社团id
     */ 
	@Column(name = "corporation_id")
	private String corporationId;
	
	/**
     * 姓名
     */ 
	@Column(name = "name")
	private String name;
	
	/**
     * 出生年月
     */ 
	@Column(name = "brithday")
	private Date brithday;
	
	/**
     * 工作单位及职务
     */ 
	@Column(name = "work_post")
	private String workPost;
	
	/**
     * 政治面貌
     */ 
	@Column(name = "political")
	private String political;
	
	/**
     * 社团用户类型：1、筹备发起人，2、社团负责人
     */ 
	@Column(name = "user_type")
	private String userType;
	
	/**
     * 删除标注:1、正常，2、删除
     */ 
	@Column(name = "remove_tag")
	private String removeTag;
	
	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;
	
	/**
     * 创建人
     */ 
	@Column(name = "create_user")
	private String createUser;
	
	/**
     * 修改时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;
	
	/**
     * 修改人
     */ 
	@Column(name = "update_user")
	private String updateUser;

	/**
	 * 出生年月
	 */
	@Transient
	private String brithdayStr;
	public WebCorporationUser(SysUser sysUser) {
		this.id= BaseUtil.uId();
		this.removeTag= BaseConstant.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}